from django.contrib.auth.models import AbstractUser
from django.db import models


class User(AbstractUser):
    """自定义用户模型"""
    status_type = ((0, u'正常'), (1, u'禁用'))
    status = models.IntegerField(choices=status_type, verbose_name='状态', default=0)  # 0正常 1禁用

    class Meta:
        db_table = "tb_users"  # 指明数据库表名
        verbose_name = "用户"  # admin 站点名
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.username
